package com.coollang.smartbra.utils;

/**
 * @author : Timmy
 * @Data: 2017/7/28
 * @Fuction: 网络访问工具类
 */
public class Urls {

    /**
     * 200 => 成功
     * -100 => 服务器访问失败
     *    -1000 => 签名验证失败
     *    -1001 => 短信验证码不正确
     *    -1002 => 缺少参数
     *    -1003 => 参数错误
     *    -1004 => 获取验证码失败
     *    -10001 => 手机已注册
     *    -10002 => 手机格式错误
     *    -10003 => 注册失败
     *    -10004 => 用户不存在
     *    -10005 => 用户名或密码错
     *    -10006 => 用户异常
     *    -10007 => 密码格式不正确
     *    -10008 => 修改用户信息失败
     *    -20001 => 动作不存在
     *    -20002 => 用户计划不存在
     *    -20003 => 计划不存在
     *    -20004 => 删除动作失败
     *    -20005 => 动作列表为空
     *    -30001 => 该用户未绑定设备
     *    -30002 => 绑定信息不存在
     *    -30003 => 解除绑定失败
     *    -30004 => 删除设备失败
     *    -30005 => 绑定设备失败
     *    -40001 => 动作列表为空
     *    -50001 => 添加版本信息失败
     *    -50002 => 版本信息不存在
     */
    public static final int CODE_SUCCESS = 200;
    public static final int CODE_Error_ = -100;
    public static final int CODE_Error_0 = -1000;
    public static final int CODE_Error_1 = -1001;
    public static final int CODE_Error_2 = -1002;
    public static final int CODE_Error_3 = -1003;
    public static final int CODE_Error_4 = -1004;
    public static final int CODE_Error_11 = -10001;
    public static final int CODE_Error_12 = -10002;
    public static final int CODE_Error_13 = -10003;
    public static final int CODE_Error_14 = -10004;
    public static final int CODE_Error_15 = -10005;
    public static final int CODE_Error_16 = -10006;
    public static final int CODE_Error_17 = -10007;
    public static final int CODE_Error_18 = -10008;
    public static final int CODE_Error_21 = -20001;
    public static final int CODE_Error_22 = -20002;
    public static final int CODE_Error_23 = -20003;
    public static final int CODE_Error_24 = -20004;
    public static final int CODE_Error_25 = -20005;
    public static final int CODE_Error_31 = -30001;
    public static final int CODE_Error_32 = -30002;
    public static final int CODE_Error_33 = -30003;
    public static final int CODE_Error_34 = -30004;
    public static final int CODE_Error_35 = -30005;
    public static final int CODE_Error_41 = -40001;
    public static final int CODE_Error_51 = -50001;
    public static final int CODE_Error_52 = -50002;

    //private static final String SERVER = "http://sport.iuphold.cn/";
    public  static final String SERVER = "http://sport.mofeitechnology.com/";



    // ================== user ====================
    private static final String USER = "user/";
    private static final String OTHER = "other/";
    private static final String DEVICE_ = "device/";
    private static final String ACTION_ = "action/";
    private static final String COUNT_ = "count/";
    private static final String PLAN_ = "plan/";

    public static final String PARAMS_GET_VERSION = "get-version";
    public static final String PARAMS_LOGIN = "login";
    public static final String PARAMS_GETCODE = "get-code";
    public static final String PARAMS_ISREGISTER = "user-is-register";
    public static final String PARAMS_REGISTER = "register";
    public static final String PARAMS_CHANGEPASSWORD = "update-password";
    public static final String PARAMS_IS_BINDING = "is-binding";
    public static final String PARAMS_BINDING_DEVICE = "binding-device";
    public static final String PARAMS_UNBINDING_DEVICE = "unbinding-device";
    public static final String PARAMS_ADD_DISTANCE_ACTION = "add-distance-action";
    public static final String PARAMS_GET_COIN_RECORD = "get-coin-record";
    public static final String PARAMS_GET_ACTIONS_AMOUNT = "get-actions-amount";
    public static final String PARAMS_GET_FOOTER_COUNT = "footer-count";
    public static final String PARAMS_GET_ONE_ACTION_FINISHED_TODAY = "get-one-action-finished-today";

    public static final String PARAMS_GET_USER_PLAN = "get-user-plan";
    public static final String PARAMS_ADD_NUMBER_ACTION = "add-number-action";
    public static final String PARAMS_ADD_TIMING_ACTION = "add-timing-action";
    public static final String PARAMS_GET_SPORT_RECORD = "get-sport-record";

    /**
     * 获取版本信息
     */
    public static final String URL_UPDATE = SERVER + OTHER + PARAMS_GET_VERSION;
    /**
     * 登录
     */
    public static final String URL_LOGIN = SERVER + USER + PARAMS_LOGIN;
    /**
     * 判断用户是否注册
     */
    public static final String URL_ISREGISTER = SERVER + USER + PARAMS_ISREGISTER;
    /**
     * 获取验证码
     */
    public static final String URL_GETCODE = SERVER + OTHER + PARAMS_GETCODE;
    /**
     * 注册
     */
    public static final String URL_REGISTER = SERVER + USER + PARAMS_REGISTER;
    /**
     * 忘记密码
     */
    public static final String URL_CHANGEPASSWORD = SERVER + USER + PARAMS_CHANGEPASSWORD;

    /**
     * 验证设备是否被绑定
     */
    public static final String URL_IS_BINDING = SERVER + DEVICE_ + PARAMS_IS_BINDING;
    /**
     * 绑定设备
     */
    public static final String URL_BINDING_DEVICE = SERVER + DEVICE_ + PARAMS_BINDING_DEVICE;
    /**
     * 解绑设备
     */
    public static final String URL_UNBINDING_DEVICE = SERVER + DEVICE_ + PARAMS_UNBINDING_DEVICE;

    /**
     * Action 动作
     */
    public static final String URL_ACTION_RUN = SERVER + ACTION_ + PARAMS_ADD_DISTANCE_ACTION;

    /**
     * U币详情
     */
    public static final String URL_UMONEY_DETAIL = SERVER + OTHER + PARAMS_GET_COIN_RECORD;

    /**
     * 获取所有运动的总数
     */
    public static final String URL_ACTION_AMOUNT = SERVER + COUNT_ + PARAMS_GET_ACTIONS_AMOUNT;

    /**
     * 获取运动统计底部数据
     */
    public static final String URL_FOOTER_COUNT = SERVER + COUNT_ + PARAMS_GET_FOOTER_COUNT;

    /**
     * 获取今日运动数据情况
     */
    public static final String URL_GET_TODAYACTION_DETAIL = SERVER + ACTION_ + PARAMS_GET_ONE_ACTION_FINISHED_TODAY;

    /**
     * 获取运动计划
     */
    public static final String URL_GET_USER_PLAN = SERVER + PLAN_ + PARAMS_GET_USER_PLAN;

    /**
     * 添加计数运动
     */
    public static final String URL_ADD_NUMBER_ACTION = SERVER + ACTION_ + PARAMS_ADD_NUMBER_ACTION;
    /**
     * 添加计时运动
     */
    public static final String URL_ADD_TIMING_ACTION = SERVER + ACTION_ + PARAMS_ADD_TIMING_ACTION;
    /**
     * 获取指定运动记录
     */
    public static final String URL_GET_SPORT_RECORD = SERVER + COUNT_ + PARAMS_GET_SPORT_RECORD;

    /**
     * ================== params ==============
     */
    public static final String PARAMS_TIMESTAMP = "timestamp";
    public static final String PARAMS_SIGN = "sign";
    public static final String USERNAME = "username";
    public static final String PASSWORD = "password";
    public static final String ZONE = "zone";
    public static final String CODE = "code";
    public static final String DEVICE = "device";
    public static final String VALIDATECODE = "validateCode";

}
